package com.example.guessthesoundtrack;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.view.MotionEvent;

public abstract class Sprite {
	private Bitmap clicked, unclicked;
	private Rect rect;
	
	private boolean pressed, down;
	private float x, y, width, height;
	
	public Sprite(Bitmap clicked, Bitmap unclicked, Rect rect, float x, float y, float width, float height) {
		this.clicked = clicked;
		this.unclicked = unclicked;
		this.rect = rect;
		this.width = width;
		this.height = height;
		this.x = x;
		this.y = y;
		this.pressed = false;
		this.down = false;
	}

	public Bitmap getClicked() {
		return clicked;
	}

	public void setClicked(Bitmap clicked) {
		this.clicked = clicked;
	}

	public Bitmap getUnclicked() {
		return unclicked;
	}

	public void setUnclicked(Bitmap unclicked) {
		this.unclicked = unclicked;
	}

	public Rect getRect() {
		return rect;
	}

	public void setRect(Rect rect) {
		this.rect = rect;
	}

	public boolean isPressed() {
		return pressed;
	}

	public void setPressed(boolean pressed) {
		this.pressed = pressed;
	}

	public boolean isDown() {
		return down;
	}

	public void setDown(boolean down) {
		this.down = down;
	}

	public float getX() {
		return x;
	}

	public void setX(float x) {
		this.x = x;
	}

	public float getY() {
		return y;
	}

	public void setY(float y) {
		this.y = y;
	}

	public float getWidth() {
		return width;
	}

	public void setWidth(float width) {
		this.width = width;
	}

	public float getHeight() {
		return height;
	}

	public void setHeight(float height) {
		this.height = height;
	}
	
	public abstract void draw(Canvas canvas);
	
	public abstract void update(int delta);
	
	public abstract void onClick(MotionEvent event, float x, float y);
	
	public abstract void onDestroy();
	
	public abstract boolean isColliding(float x, float y);
}
